import { httpGet, httpPost, httpDel } from "@/appBase/request";
import { toData, toPageData, toPageQueryParam } from "@/appBase/utils";

/* 
客户关联项目列表
*/
export function customerProjectList(queryParam,pageParam) {
    return httpPost(`/project/customer-project-list`, toPageQueryParam(queryParam, pageParam)).then((result) => toPageData(result,pageParam));
}

/**
 * 客户树
 * @param {Object} queryParam
 */
export function queryCustomerTree(queryParam) {
    return httpGet(`/customer/tree`, queryParam).then((result) => toData(result));
}
/**
 * 客户树排序
 * @param {Object} queryParam
 * @param {String} queryParam.changeId1
 * @param {String} queryParam.changeId2
 */
export function updateCustomerTreeSort(queryParam) {
    return httpPost(`/customer/tree/sort`, queryParam).then((result) => toData(result));
}